﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RRRSRoguelike.Managers;
using RRRSRoguelikeData;
using System.Diagnostics;
using RRRSRoguelike.Helpers;
using System.Drawing;

namespace RRRSRoguelike.Screens
{
    class TextScreen:Screen
    {
        string text;
        Panel mainPanel;

        public TextScreen(string textFileName):base()
        {
            Panels.Add(new Panel(new Point(4, 3), DungeonVisualizer.GetScreenWidth() - 9, DungeonVisualizer.GetScreenHeight() - 6));
            mainPanel = Panels[0];
            text = TxtFileToString.Read("Content/Texts/" + textFileName + ".txt");
        }

        public override void Show()
        {
            Clear();

        ////This is to help me check if the installer is grabbing the correct version.
        //#if DEBUG
        //Console.WriteLine("Configuration: Debug");
        //#else
        //Console.WriteLine("Configuration: Release");
        //#endif


            this.mainPanel.Write(text, ConsoleColor.White,TextAlignment.Multi);

            mainPanel.Draw();
            
            DungeonManager.Instance.PlaySound(SoundList.Pluck);

            Console.ReadKey();
        }
    }
}
